<?php
class video_export extends Model
{
    public static function getTableName()
    {
        return 'video_export';
    }

	/*
	 * by donald
	 * at 2011-10-27
	 */
	public function set($object)
	{
		$this->video_id = $object->video_id;
		$this->vi_id = $object->vi_id;
		$this->export_id = $object->export_id;
		$this->export_params = $object->export_params;
	}

	/*
	 * by donald
	 * modified at 2011-10-07
	 */
	public static function getAll($video_id)
	{
		return self::$dbo['w']->find(__CLASS__, 'video_id = ?', array($video_id));
	}

	/*
	 * by donald
	 * at 2011-10-07
	 */
	public function delete_change_log()
	{
		$type = $this->getTableName();
		$keys = array('id' => $this->id);
		$is_publish = 0;

		change_log::delTypeAndKeysLog($type, $keys, $is_publish);
	}

}
?>
